package cn.kzgg.ymcc.feign;

import cn.kzgg.ymcc.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value = "service-course",fallbackFactory = CourseUserLearnFeignClientFallbackFactory.class)
public interface CourseUserLearnFeignClient {

    @RequestMapping(value = "/courseUserLearn/{courseId}/{loginId}",method = RequestMethod.GET)
    JSONResult checkUrlPermission(@PathVariable("courseId")Long courseId, @PathVariable("loginId")Long loginId);

    /**
     * 提交订单，给订单微服务提供
     * @param courseIds
     * @return
     */
    @RequestMapping(value = "/course/info/{courseIds}", method = RequestMethod.GET)
    JSONResult CourseOrderInfo(@PathVariable("courseIds") String courseIds);
}
